var obj = {
	methods: {
		checkLogin1(val) {
			if (this.checkLogins()) {
				val()
			}
		},
		checkLogins() {
			var val = uni.getStorageSync("token")
			if (val) {
				return true
			} else {
				uni.showModal({
					title:"登录提示",
					content:"暂未登录,是否跳转到登录页面",
					success(res) {
						if (res.confirm) {
							uni.navigateTo({
								url:"/pages/user/login/login"
							})
						} else {
							uni.showToast({
								title:"取消登录",
								icon:"success"
							})
						}
					}
				})
				return false
			}
		}
	}
}

export default obj